
public class CacheClass <K,V> {
	private V v;
	private K k;
	public boolean collect(K key){
		synchronized (this.v) {
			synchronized (this.k) {
				if (key.equals(this.k)) return true;
				return false;
				
			}
		}
			
		
	}
	public V get(K key){
		
		synchronized (this.v) {
			synchronized (this.k) {
				if (key.equals(key)) return v;
				return null;
				
			}
		}
			
		
	}
	
	public void put(K key, V value){
		synchronized (this.v) {
			synchronized (this.k) {
				
				this.v=value;
				this.k=key;
			}
		}
			
		
	}
}
